<template>
  <el-menu-item index="11" @click="monitor(2)">事件更新</el-menu-item>

  <!-- updatepopup 弹窗 -->
  <div
    id="updatepopup"
    v-show="update"
    :style="{ top: clientY, left: clientX }"
  >
    <div class="title">
      事件详情信息
      <button class="btn-close" @click="popuShow()">×</button>
    </div>
    <tr>
      <td>事件编号：</td>
      <td>{{ incidentNumber }}</td>
    </tr>
    <tr>
      <td>事件类型：</td>
      <td>{{ incidentType }}</td>
    </tr>
    <tr>
      <td>事件等级：</td>
      <td>{{ incidentLevel }}</td>
    </tr>
    <tr>
      <td>发生时间：</td>
      <td>{{ incidentTime }}</td>
    </tr>
    <tr>
      <td>发生地点：</td>
      <td>{{ incidentAddress }}</td>
    </tr>
    <tr>
      <td>车牌号：</td>
      <td>{{ incidentCar }}</td>
    </tr>
    <tr>
      <td>驾驶员：</td>
      <td>{{ incidentPerson }}</td>
    </tr>
    <tr>
      <td>处理状态：</td>
      <td>
        <select v-model="ProcessingState">
          <option value="0">未处理</option>
          <option value="1">处理中</option>
          <option value="2">已处理</option>
        </select>
      </td>
    </tr>

    <!-- <button id="close" @click="popuShow()">关闭</button> -->
    <button class="updatebtn" @click="updatePoint1()">更新</button>
  </div>
</template>

<script setup>
import { EventUpdate } from './hooks/EventUpdate'
const map = ref()

onMounted(() => {
  //初始化地图
  map.value = useGlobalMap()
})
const {
  monitor,
  updatePoint1,
  popuShow,
  update,
  clientY,
  clientX,
  incidentNumber,
  incidentType,
  incidentLevel,
  incidentTime,
  incidentAddress,
  incidentCar,
  incidentPerson,
  ProcessingState,
} = EventUpdate(map)
</script>

<style scoped>
@import url('./style/EvebtUpdate.css');
</style>
